#include <stdio.h>
#include <stdlib.h>

int a;
char va[6] = {0xa, 2, 3, 4, 5, 6};

void set_bit3()
{
  /*4005fc:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400600:	9100f000 	add	x0, x0, #0x3c	// x0 = 41103c
  400604:	b9400000 	ldr	w0, [x0]
  400608:	321d0001 	orr	w1, w0, #0x8
  40060c:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400610:	9100f000 	add	x0, x0, #0x3c
  400614:	b9000001 	str	w1, [x0] */
	  a |= 0x8;

  /*400618:	d503201f 	nop
  40061c:	d65f03c0 	ret*/
}

void clear_bit3()
{
  /*400620:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400624:	9100f000 	add	x0, x0, #0x3c	// x0 = 0x41103c
  400628:	b9400000 	ldr	w0, [x0]
  40062c:	121c7801 	and	w1, w0, #0xfffffff7
  400630:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400634:	9100f000 	add	x0, x0, #0x3c
  400638:	b9000001 	str	w1, [x0]*/
	  a &= ~0x8;

  /*40063c:	d503201f 	nop
  400640:	d65f03c0 	ret*/
}

int main()
{
  /*400644:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
  400648:	910003fd 	mov	x29, sp
  40064c:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400650:	9100f000 	add	x0, x0, #0x3c	// x0 = 0x41103c
  400654:	52800061 	mov	w1, #0x3                   	// #3
  400658:	b9000001 	str	w1, [x0]*/
	  a = 3;

  /*40065c:	90000000 	adrp	x0, 400000 <_init-0x480>
  400660:	911ee001 	add	x1, x0, #0x7b8	// x1 = 4007b8
  400664:	910063a0 	add	x0, x29, #0x18	// x0 = x29+0x18
  400668:	b9400022 	ldr	w2, [x1]		// w2 = [0x4007b8]
  40066c:	b9000002 	str	w2, [x0]		// [x29+0x18] = [0x4007b8]	// 4
  400670:	b8402021 	ldur	w1, [x1, #2]	// w1 = [x1+2]
  400674:	b8002001 	stur	w1, [x0, #2]	// [x0+2] = w1 */		// 2	-> 4+2 = 6
	char vb[6] = {10, 2, 3, 4, 5, 6};

  /*400678:	90000000 	adrp	x0, 400000 <_init-0x480>
  40067c:	911ec000 	add	x0, x0, #0x7b0
  400680:	52800101 	mov	w1, #0x8                   	// #8
  400684:	97ffff9b 	bl	4004f0 <printf@plt>*/
	  printf("a = %d\n", 8);

  /*400688:	97ffffdd 	bl	4005fc <set_bit3> */
	  set_bit3();

  /*40068c:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  400690:	9100f000 	add	x0, x0, #0x3c
  400694:	b9400001 	ldr	w1, [x0]
  400698:	90000000 	adrp	x0, 400000 <_init-0x480>
  40069c:	911ec000 	add	x0, x0, #0x7b0
  4006a0:	97ffff94 	bl	4004f0 <printf@plt>*/
	  printf("a = %d\n", a);

  /* 4006a4:	97ffffdf 	bl	400620 <clear_bit3> */
	  clear_bit3();

  /*4006a8:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  4006ac:	9100f000 	add	x0, x0, #0x3c
  4006b0:	b9400001 	ldr	w1, [x0]
  4006b4:	90000000 	adrp	x0, 400000 <_init-0x480>
  4006b8:	911ec000 	add	x0, x0, #0x7b0
  4006bc:	97ffff8d 	bl	4004f0 <printf@plt>*/
	  printf("a = %d\n", a);

  /*4006c0:	394063a0 	ldrb	w0, [x29, #24]
  4006c4:	2a0003e1 	mov	w1, w0
  4006c8:	90000000 	adrp	x0, 400000 <_init-0x480>
  4006cc:	911ec000 	add	x0, x0, #0x7b0
  4006d0:	97ffff88 	bl	4004f0 <printf@plt>*/
	printf("a = %d\n", vb[0]);

  /*4006d4:	b0000080 	adrp	x0, 411000 <__libc_start_main@GLIBC_2.17>
  4006d8:	9100c000 	add	x0, x0, #0x30
  4006dc:	39400000 	ldrb	w0, [x0]
  4006e0:	2a0003e1 	mov	w1, w0
  4006e4:	90000000 	adrp	x0, 400000 <_init-0x480>
  4006e8:	911ec000 	add	x0, x0, #0x7b0
  4006ec:	97ffff81 	bl	4004f0 <printf@plt>*/
	printf("a = %d\n", va[0]);

  /*4006f0:	52800000 	mov	w0, #0x0                   	// #0
  4006f4:	a8c27bfd 	ldp	x29, x30, [sp], #32
  4006f8:	d65f03c0 	ret*/
}
